﻿namespace Taobao.Model
{
    using Castle.ActiveRecord;
    using System;
    using System.Collections.Generic;

    [ActiveRecord]
    public class Trade : ActiveRecordBase<Trade>
    {
        private decimal? _adjustfee;
        private string _alipayNo;
        private string _buyer_nick;
        private string _buyerAlipayNo;
        private string _buyerMemo;
        private DateTime? _created;
        private decimal? _discountfee;
        private DateTime? _endTime;
        private IList<OrderInfo> _orderInfoes;
        private short _orderNum;
        private string _orderPrice;
        private string _ordersTitle;
        private Taobao.Model.OutSent _outSent;
        private string _payment;
        private DateTime? _payTime;
        private string _postFee;
        private string _receiverAddress;
        private string _receiverCity;
        private string _receiverDistrict;
        private string _receiverMobile;
        private string _receiverName;
        private string _receiverPhone;
        private string _receiverState;
        private string _receiverZip;
        private string _seller_nick;
        private string _sellerFlag;
        private string _sellerMemo;
        private string _sellerMobile;
        private string _sellerName;
        private string _shippingType;
        private Taobao.Model.Shop _shop;
        private string _status;
        private long _taobaoTid;
        private long _tid;
        private string _type;

        [Property(ColumnType="Decimal")]
        public virtual decimal? Adjust_Fee
        {
            get
            {
                return this._adjustfee;
            }
            set
            {
                this._adjustfee = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string AlipayNo
        {
            get
            {
                return this._alipayNo;
            }
            set
            {
                this._alipayNo = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Buyer_nick
        {
            get
            {
                return this._buyer_nick;
            }
            set
            {
                this._buyer_nick = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string BuyerAlipayNo
        {
            get
            {
                return this._buyerAlipayNo;
            }
            set
            {
                this._buyerAlipayNo = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string BuyerMemo
        {
            get
            {
                return this._buyerMemo;
            }
            set
            {
                this._buyerMemo = value;
            }
        }

        [Property(ColumnType="DateTime")]
        public virtual DateTime? Created
        {
            get
            {
                return this._created;
            }
            set
            {
                this._created = value;
            }
        }

        [Property(ColumnType="Decimal")]
        public virtual decimal? Discount_Fee
        {
            get
            {
                return this._discountfee;
            }
            set
            {
                this._discountfee = value;
            }
        }

        [Property(ColumnType="DateTime")]
        public virtual DateTime? EndTime
        {
            get
            {
                return this._endTime;
            }
            set
            {
                this._endTime = value;
            }
        }

        [HasMany(typeof(OrderInfo))]
        public virtual IList<OrderInfo> OrderInfoes
        {
            get
            {
                return this._orderInfoes;
            }
            set
            {
                this._orderInfoes = value;
            }
        }

        [Property(ColumnType="Int16")]
        public virtual short OrderNum
        {
            get
            {
                return this._orderNum;
            }
            set
            {
                this._orderNum = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string OrderPrice
        {
            get
            {
                return this._orderPrice;
            }
            set
            {
                this._orderPrice = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string OrdersTitle
        {
            get
            {
                return this._ordersTitle;
            }
            set
            {
                this._ordersTitle = value;
            }
        }

        [OneToOne]
        public virtual Taobao.Model.OutSent OutSent
        {
            get
            {
                return this._outSent;
            }
            set
            {
                this._outSent = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Payment
        {
            get
            {
                return this._payment;
            }
            set
            {
                this._payment = value;
            }
        }

        [Property(ColumnType="DateTime")]
        public virtual DateTime? PayTime
        {
            get
            {
                return this._payTime;
            }
            set
            {
                this._payTime = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string PostFee
        {
            get
            {
                return this._postFee;
            }
            set
            {
                this._postFee = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverAddress
        {
            get
            {
                return this._receiverAddress;
            }
            set
            {
                this._receiverAddress = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverCity
        {
            get
            {
                return this._receiverCity;
            }
            set
            {
                this._receiverCity = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverDistrict
        {
            get
            {
                return this._receiverDistrict;
            }
            set
            {
                this._receiverDistrict = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverMobile
        {
            get
            {
                return this._receiverMobile;
            }
            set
            {
                this._receiverMobile = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverName
        {
            get
            {
                return this._receiverName;
            }
            set
            {
                this._receiverName = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverPhone
        {
            get
            {
                return this._receiverPhone;
            }
            set
            {
                this._receiverPhone = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverState
        {
            get
            {
                return this._receiverState;
            }
            set
            {
                this._receiverState = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ReceiverZip
        {
            get
            {
                return this._receiverZip;
            }
            set
            {
                this._receiverZip = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Seller_nick
        {
            get
            {
                return this._seller_nick;
            }
            set
            {
                this._seller_nick = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string SellerFlag
        {
            get
            {
                return this._sellerFlag;
            }
            set
            {
                this._sellerFlag = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string SellerMemo
        {
            get
            {
                return this._sellerMemo;
            }
            set
            {
                this._sellerMemo = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string SellerMobile
        {
            get
            {
                return this._sellerMobile;
            }
            set
            {
                this._sellerMobile = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string SellerName
        {
            get
            {
                return this._sellerName;
            }
            set
            {
                this._sellerName = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string ShippingType
        {
            get
            {
                return this._shippingType;
            }
            set
            {
                this._shippingType = value;
            }
        }

        [BelongsTo]
        public virtual Taobao.Model.Shop Shop
        {
            get
            {
                return this._shop;
            }
            set
            {
                this._shop = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Status
        {
            get
            {
                return this._status;
            }
            set
            {
                this._status = value;
            }
        }

        [Property(ColumnType="Int64")]
        public virtual long TaobaoTid
        {
            get
            {
                return this._taobaoTid;
            }
            set
            {
                this._taobaoTid = value;
            }
        }

        [PrimaryKey(PrimaryKeyType.Native, ColumnType="Int64")]
        public virtual long Tid
        {
            get
            {
                return this._tid;
            }
            set
            {
                this._tid = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Type
        {
            get
            {
                return this._type;
            }
            set
            {
                this._type = value;
            }
        }


        [Property(ColumnType = "Int32")]
        public virtual int TProcess
        {
            get;
            set;
        }
    }
}

